package com.itheima.array;

public class Demo2array {
    public static void main(String[] args) {
        int[] arr1 = new int[2];
        System.out.println(arr1);
        arr1[0]=11;
        arr1[1]=22;
        System.out.println(arr1[0]);
        System.out.println(arr1[1]);
        System.out.println("--------------");
        int[] arr2 = arr1;
        System.out.println(arr2);//赋值空间地址 两个人指向同一空间
        arr2[0]=33;
        arr2[1]=44;

        System.out.println(arr2[0]);
        System.out.println(arr1[0]);
        System.out.println(arr1[1]);

    }
}
